<template>
  <div v-if="show" class="index-server">
    <div class="chart-main-title">
      <h1>萌宠客服</h1>
      <span class="title-icon">
        <img
          @click="show = false"
          class="icon"
          src="../assets/image/suo.png"
          alt=""
        />
      </span>
    </div>
    <div class="chart-list" id="chart-list">
      <div class="chart-item">
        <div class="chart-name">萌宠XXXX客服专线:xxxxxx</div>
        <div class="chart-message-user">
          为你骄傲房间卡会计法发哈很干净安静法芙娜
        </div>
      </div>
    </div>
    <div class="chart-form">
      <div class="toolbar">
        <img class="icon" src="../assets/image/emo.png" alt="" />
        <img class="icon" src="../assets/image/image.png" alt="" />
        <img class="icon" src="../assets/image/file.png" alt="" />
        <img class="icon" src="../assets/image/screen.png" alt="" />
      </div>
      <div>
        <textarea
          class="chart-message"
          id="message"
          placeholder="点击这里输入内容..."
        ></textarea>
      </div>
      <div class="chart-btn">
        <input type="button" id="send" class="chart-form-send" value="发表" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      show: true,
    };
  },
};
</script>

<style lang="scss" scoped>
.index-server {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 320px;
  height: 520px;
  margin-right: 20px;
  margin-bottom: 20px;
  background-color: #fff;
  .chart-main-title {
    background-color: #b28b6c;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    h1 {
      display: inline-block;
      padding: 10px;
      font: 18px/1.5 "Microsoft Yahei";
      padding-bottom: 20px;
      border-bottom: 1px solid #cccc;
      color: #fff;
    }
    .title-icon {
      padding: 10px;
      line-height: 38px;
    }
  }
  .icon {
    width: 24px;
    height: 24px;
    margin: 0 4px;
  }
  .chart-list {
    width: 100%;
    height: 280px;
    background-color: #f5f5f5;
    padding: 5px;
    .chart-item {
      margin: 10px;
      .chart-name {
        font-size: 12px;
        margin-bottom: 2px;
      }
      .chart-message-user {
        position: relative;
        float: left;
        padding: 10px;
        min-width: 100px;
        max-width: 520px;
        background: #fff;
        font-size: 14px;
        line-height: 24px;
        border-radius: 0 6px 6px 6px;
      }
    }
  }
  .chart-form {
    .toolbar {
      height: 36px;
      padding: 0 5px;
      border-top: 1px solid #f3f3f3;
      padding: 5px;
    }
    .chart-message {
      background-color: #f5f5f5;
      width: 100%;
      height: 100px;
      line-height: 22px;
      font-size: 14px;
      padding: 5px;
    }
    .chart-btn {
      text-align: right;
      margin-right: 20px;
      #send {
        padding: 5px 10px;
        &:active {
          opacity: 0.5;
        }
      }
    }
  }
}
::-webkit-scrollbar {
  width: 12px;
}
/* 滚动槽 */
::-webkit-scrollbar-track {
  box-shadow: inset006pxrgba(0, 0, 0, 0.3);
  border-radius: 10px;
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.1);
  box-shadow: inset006pxrgba(0, 0, 0, 0.5);
}
::-webkit-scrollbar-thumb:window-inactive {
  background: rgba(255, 0, 0, 0.4);
}
</style>
